package com.zzy.cms.controller;

import com.zzy.cms.entity.CrmBanner;
import com.zzy.cms.service.CrmBannerService;
import com.zzy.commonutils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @Author KAZU
 * @Date 2023/1/18 11:58
 * @Version 1.0
 */
@SuppressWarnings({"all"})
@RestController
@RequestMapping("/educms/bannerfront")
@CrossOrigin
public class BannerFrontController {

	@Autowired
	private CrmBannerService bannerService;
	
	@ApiOperation(value = "查询所有Banner")
	@GetMapping("getAllBanner")
	public R getAllBanner() {
		List<CrmBanner> list = bannerService.selectAllBanner();
		return R.ok().data("list", list);
	}

}
